package com.xyh.transaction.mapper;

import com.xyh.transaction.common.ImageType;
import com.xyh.transaction.entity.Image;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ImageMapper {


    void insert(Image image);

    void deleteByRelatedId(@Param("relatedId") Integer relatedId, @Param("type") ImageType type);

    List<Image> findByRelatedId(@Param("relatedId") Integer relatedId, @Param("type") ImageType type);

    List<Image> findAll();

    void deleteBatchByIds(List<Integer> ids);

    List<Image> findByImageType(ImageType type);

    void update(Image image);
}
